/*
 * ArrowOpen.cpp
 *
 *  Created on: 14/07/2013
 *      Author: notebook
 */

#include "gui/VisualComponents/ArrowOpen.h"

ArrowOpen::ArrowOpen() :
		ArrowHead(), line_color_("black") {
}

void ArrowOpen::draw(Cairo::RefPtr< Cairo::Context > context_ref, double start_x, double start_y, double end_x, double end_y){
	double x1;
	double y1;
	double x2;
	double y2;

	calcVertexes (start_x, start_y, end_x, end_y, x1, y1, x2, y2);

	context_ref->set_source_rgb (line_color_.get_red_p(), line_color_.get_blue_p(), line_color_.get_green_p());

	context_ref->move_to (end_x, end_y);
	context_ref->line_to (x1, y1);
	context_ref->stroke();

	context_ref->move_to (end_x, end_y);
	context_ref->line_to (x2, y2);
	context_ref->stroke();
}
